#!/bin/sh

set -x

#  1.  Generate CSF expansions
#      1.1 DF for 1s(2)2s and 1s(2)2p

rcsfgenerate <<EOF1
*
0
1s(2,i)2s(1,i)

2s
1,1
0
y
1s(2,i)2p(1,i)

1s,2p
1,3
0
n

EOF1

cp rcsf.out DF.c

#        1.2 SDT even for n=4

rcsfgenerate <<EOF3
*
0
1s(2,*)2s(1,*)

4s,4p,4d,4f
1,1
3
n
EOF3

cp rcsf.out even.c

#       Split into even3.c, even4.c

rcsfsplit <<EOF5
even
2
3s,3p,3d
3
4s,4p,4d,4f
4
EOF5

#        1.3 SDT odd for n=4

rcsfgenerate <<EOF3
*
0
1s(2,*)2p(1,*)

4s,4p,4d,4f
1,3
3
n
EOF3

cp rcsf.out odd.c

#       Split into odd3.c, odd4.c

rcsfsplit <<EOF5
odd
2
3s,3p,3d
3
4s,4p,4d,4f
4
EOF5

